package com.ssyt.ssh.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Table(name="emp")
@Entity
public class Employee {
	
	private Integer empId;
	private String empName;
	private String empSex;
	private Integer empAge;
	private String empMjor;
	private Date   empHiredate;
	private Department dept;
	
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name = "EMP_ID")
	public Integer getEmpId() {
		return empId;
	}
	public void setEmpId(Integer empId) {
		this.empId = empId;
	}
	
	@Column(name = "EMP_NAME")
	public String getEmpName() {
		return empName;
	}
	public void setEmpName(String empName) {
		this.empName = empName;
	}

	@Column(name = "EMP_SEX")
	public String getEmpSex() {
		return empSex;
	}
	public void setEmpSex(String empSex) {
		this.empSex = empSex;
	}
	
	@Column(name = "EMP_AGE")
	public Integer getEmpAge() {
		return empAge;
	}
	public void setEmpAge(Integer empAge) {
		this.empAge = empAge;
	}
	
	@Column(name = "EMP_MJOR")
	public String getEmpMjor() {
		return empMjor;
	}
	public void setEmpMjor(String empMjor) {
		this.empMjor = empMjor;
	}
	
	@Column(name = "EMP_HIREDATE")
	public Date getEmpHiredate() {
		return empHiredate;
	}
	public void setEmpHiredate(Date empHiredate) {
		this.empHiredate = empHiredate;
	}
	@ManyToOne
	@JoinColumn(name = "DEPT_ID")
	public Department getDept() {
		return dept;
	}
	public void setDept(Department dept) {
		this.dept = dept;
	}
	
}
